﻿using System;
using System.Collections.Generic;
 using UnityEngine.UI;
using UnityEngine;
using System.Text;

 
    class StartSceneState:ISceneState
    {
        private float mSmoothingSpeed = 1;
        private float mWhatTime = 2;
        public StartSceneState(SceneStateController controller) : base("StartScene", controller)
        { 

        }

        private Image mLog;
    public override void StateStart()
    {
        //得到logo
        mLog = GameObject.Find("Logo").GetComponent<Image>();
        mLog.color = Color.black;
    }
    public override void StateUpdate()
    {
        mLog.color = Color.Lerp(mLog.color,Color.white, mSmoothingSpeed * Time.deltaTime);
        mWhatTime -= Time.deltaTime;
        if (mWhatTime<=0)
        {   
            //2s切换到主页面
            mController.SetState(new MainMeunSceneState(mController));
        }
    }
}
 
